// 本地SVG图标
import * as LocalIcons from "@/assets/components/index";

let icons = new Array();

// 注册SVG图标
for (const [key, component] of Object.entries(LocalIcons)) {
  let name = key.substring(4, key.length);
  icons.push(camelToKebabCase(name));
}

// 在 utils 文件或其他辅助工具集中创建一个工具函数
export function camelToKebabCase(str: string): string {
  return str.replace(/([a-zA-Z])([A-Z])/g, '$1-$2').toLowerCase();
}

export default icons;